﻿using System;
using Autodesk.Revit.DB;
using Autodesk.Revit.UI.Selection;

namespace YJKArchMethodLibrary.OutWallSearch
{
	public class CenterLineFilter : ISelectionFilter
	{
		public CenterLineFilter(bool includeTempLine = false)
		{
			this.m_IncludeTempLine = includeTempLine;
		}

		public bool AllowElement(Element elem)
		{
			return (!(typeof(DetailLine) != elem.GetType()) || !(typeof(DetailArc) != elem.GetType())) && elem is DetailCurve;
		}

		public bool AllowReference(Reference reference, XYZ pos)
		{
			return false;
		}

		private bool m_IncludeTempLine;
	}
}
